<?php
include '../../templates/db/db.php';
$id = $_GET['id'];

$sel_g = mysql_query('SELECT * FROM groups WHERE id='.$id.'') or die(mysql_error());
$row_g = mysql_fetch_assoc($sel_g);

$sel_u = mysql_query('SELECT * FROM users WHERE username="'.$_SESSION['username'].'"');
$sel_f = mysql_fetch_assoc($sel_u);

$ee = $row_g['chek'].'1'.$_SESSION['username'].$sel_f['id']." ,";

$query_updateche = 'UPDATE groups SET chek="'.$ee.'" WHERE id='.$id.' LIMIT 1';
$query_updateche_asd=mysql_query($query_updateche);
header("Location: ../home_work.php");
?>